# -*- coding: utf-8 -*-
from openerp import models, fields, api

class gmq_bs_yyd(models.Model):
    '''
    预约单
    '''
    _name = 'gmq.bs.yyd'
    _rec_name = 'user_ref'
    _description = u'预约单'

    # bh = fields.Char(u'预约单编号')
    user_ref = fields.Many2one('gmq.bs.student',u'关联学生')
    booking_time = fields.Datetime(u'预约时间')
    booking_seat = fields.Many2one('gmq.bs.seat',u'关联座位')
    # room = fields.Many2one('gmq.bs.seat.room',u'关联教室')
    end_time = fields.Datetime(u'最迟时间')
    state = fields.Selection([
        ('已预约', '已预约'),
        ('已退座', '已退座'),
        ('已签到', '已签到'),
        ('已签退', '已签退'),
        ('违规', '违规'),
        ('已取消', '已取消'),], string='状态')
    qt_time = fields.Datetime(u'签退时间')
    # zdtz = fields.Boolean(u'主动退座')
    qd_time = fields.Datetime(u'签到时间')
    # sc_time = fields.Datetime(u'相差时长')
    xc_time = fields.Char(u'相差时长')
    isactivity = fields.Boolean(u'是否有效',default = True)

